package com.zbkj.crmeb.task.order;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import com.utils.DateUtil;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.zbkj.crmeb.store.service.UserCommissionService;

/**
 * 解冻未获的佣金订单
 */
@Component
@Configuration //读取配置
public class UnfreezeOrderTask {
    private static final Logger logger = LoggerFactory.getLogger(UnfreezeOrderTask.class);

    @Autowired
    private UserCommissionService userCommissionService;

    //1分钟同步一次数据
	@XxlJob("unfreezeOrderTask")
    public void init(){
        logger.info("---userCommissionService task------produce Data with fixed rate task: Execution Time - {}", DateUtil.nowDateTime());
        try {
            userCommissionService.unfreezeOrder();
        }catch (Exception e){
            logger.error("userCommissionService.task" + " | msg : " + e.getMessage());
        }

    }

}
